package com.back_end.Thread.singleThread.TEST;

public class Demo01 {
    public static void main(String[] args) throws InterruptedException {
        System.out.println("hello"  + "\n"+ "start---");
        long time1 =   System.currentTimeMillis();
        long time = 100*100l;
        Thread.sleep(time);   // 这个只是调用了下sleep,不是线程执行..
        long tiem2 = System.currentTimeMillis();

        long totalTime = tiem2 - time1;
        System.out.println("sleepTime:" + totalTime + "\nout:" + "\n"+ "world");




        new Thread(()->{
            for (int i = 0; i < 5; i++) {
                System.out.println(Thread.currentThread().getName()+"线程执行数字"+i);
            }
        }).start();




    }
}
